#include "skill.h"

Skill::Skill(QString name, QList<MetaSkill*> metaSkills, QObject *parent) :
    QObject(parent)
{
    this->metaSkills = metaSkills;
    this->name = name;
}

void Skill::setHero(HeroCard* hero)
{
    this->hero = hero;
    for(int i = 0; i < metaSkills.size(); i++)
        metaSkills.at(i)->setHero(hero);
}

void Skill::load()
{
    for(int i = 0; i < metaSkills.size(); i++)
        metaSkills.at(i)->load();
}

void Skill::unload()
{
    for(int i = 0; i < metaSkills.size(); i++)
        metaSkills.at(i)->unload();
}
